/* 
 *  Body
 *
 *  Body is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Foobar is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY ); without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 **********************************************************************************
 *  WARNING: THIS CODE WAS GENERATED DO NOT MODIFY, CHANGE THE XSD INSTEAD
 *  Generated by schema2code on Tue Jun 14 15:34:00 2016.
 **********************************************************************************
 *  Copyright 2010
 *
 */

#ifndef __BODY_H__
#define __BODY_H__

#include <QObject>
#include <QString>
#include <QDateTime>
#include "IVEFLoginRequest.h"
#include "IVEFLoginResponse.h"
#include "IVEFLogout.h"
#include "IVEFObjectDatas.h"
#include "IVEFPing.h"
#include "IVEFPong.h"
#include "IVEFServerStatus.h"
#include "IVEFServiceRequest.h"
#include "IVEFServiceRequestResponse.h"

class XmlStreamReader;

namespace ivef {

//-----------------------------------------------------------
//! \brief       Class definition of Body
//!
//! 
//!
class Body : public QObject { 
    Q_OBJECT

public:
    //! constructor
    //!
    Body();
    //! constructor for parser function
    //!
    Body(XmlStreamReader&);
    //! copy constructor
    //!
    Body(const Body&);
    //! = operator
    //!
    Body & operator=(const Body& val);
    //! == operator
    //!
    bool operator==(const Body& val);
    //! sets the LoginRequest: MESSAGE sent by the user to identify oneselfs and request the default service
    //!
    bool setLoginRequest(const LoginRequest& val);

    //! gets the LoginRequest: MESSAGE sent by the user to identify oneselfs and request the default service
    //!
    //! \return     LoginRequest
    //!
    const LoginRequest& getLoginRequest() const;

    //! returns true if LoginRequestis used (optional field).
    //!
    //! \return     bool
    bool hasLoginRequest() const;

    //! sets the LoginResponse: MESSAGE sent by the supplier indicating wether the user login was accepted or not
    //!
    bool setLoginResponse(const LoginResponse& val);

    //! gets the LoginResponse: MESSAGE sent by the supplier indicating wether the user login was accepted or not
    //!
    //! \return     LoginResponse
    //!
    const LoginResponse& getLoginResponse() const;

    //! returns true if LoginResponseis used (optional field).
    //!
    //! \return     bool
    bool hasLoginResponse() const;

    //! sets the Logout: MESSAGE sent by the user to announce it will close it's connection
    //!
    bool setLogout(const Logout& val);

    //! gets the Logout: MESSAGE sent by the user to announce it will close it's connection
    //!
    //! \return     Logout
    //!
    const Logout& getLogout() const;

    //! returns true if Logoutis used (optional field).
    //!
    //! \return     bool
    bool hasLogout() const;

    //! sets the ObjectDatas
    //!
    bool setObjectDatas(const ObjectDatas& val);

    //! gets the ObjectDatas
    //!
    //! \return     ObjectDatas
    //!
    const ObjectDatas& getObjectDatas() const;

    //! returns true if ObjectDatasis used (optional field).
    //!
    //! \return     bool
    bool hasObjectDatas() const;

    //! sets the Ping: MESSAGE sent by either the user or the supplier to verify the aliveness of the connection, failure to respond within the timeout will lead to disconnect (default = 3 seconds)
    //!
    bool setPing(const Ping& val);

    //! gets the Ping: MESSAGE sent by either the user or the supplier to verify the aliveness of the connection, failure to respond within the timeout will lead to disconnect (default = 3 seconds)
    //!
    //! \return     Ping
    //!
    const Ping& getPing() const;

    //! returns true if Pingis used (optional field).
    //!
    //! \return     bool
    bool hasPing() const;

    //! sets the Pong: MESSAGE sent as reply to a MSG_Ping to confirm the aliveness of the connection.
    //!
    bool setPong(const Pong& val);

    //! gets the Pong: MESSAGE sent as reply to a MSG_Ping to confirm the aliveness of the connection.
    //!
    //! \return     Pong
    //!
    const Pong& getPong() const;

    //! returns true if Pongis used (optional field).
    //!
    //! \return     bool
    bool hasPong() const;

    //! sets the ServerStatus: MESSAGE sent by the server in case the server is experienceing / recovering from load problems
    //!
    bool setServerStatus(const ServerStatus& val);

    //! gets the ServerStatus: MESSAGE sent by the server in case the server is experienceing / recovering from load problems
    //!
    //! \return     ServerStatus
    //!
    const ServerStatus& getServerStatus() const;

    //! returns true if ServerStatusis used (optional field).
    //!
    //! \return     bool
    bool hasServerStatus() const;

    //! sets the ServiceRequest: MESSAGE sent by the user to request a different service than the current service, to stop all services request data from 0 areas or logout
    //!
    bool setServiceRequest(const ServiceRequest& val);

    //! gets the ServiceRequest: MESSAGE sent by the user to request a different service than the current service, to stop all services request data from 0 areas or logout
    //!
    //! \return     ServiceRequest
    //!
    const ServiceRequest& getServiceRequest() const;

    //! returns true if ServiceRequestis used (optional field).
    //!
    //! \return     bool
    bool hasServiceRequest() const;

    //! sets the ServiceRequestResponse: MESSAGE sent by the suplier as as a response to a service request
    //!
    bool setServiceRequestResponse(const ServiceRequestResponse& val);

    //! gets the ServiceRequestResponse: MESSAGE sent by the suplier as as a response to a service request
    //!
    //! \return     ServiceRequestResponse
    //!
    const ServiceRequestResponse& getServiceRequestResponse() const;

    //! returns true if ServiceRequestResponseis used (optional field).
    //!
    //! \return     bool
    bool hasServiceRequestResponse() const;

    //! generates XML of this object including attributes and child elements
    //! returns QString::null if not all required elements are available
    //! If null returned check lastError() for problem description
    //!
    //! \return     QString
    const QString& toXML(bool outputNamespace = true);

    //! generates output of this object including attributes and child elements
    //!
    //! \return     QString
    QString toString() const;

    //! generates output of this object including attributes and child elements
    //!
    //! \return     QString
    QString toString(QString lead) const;

    //! return last error found in toXML function
    //!
    //! \return     QString
    const QString& lastError() const;

    //! return changed 
    //!
    //! \return     bool
    const bool& changed() const;

    //! return store 
    //!
    //! \return     QString
    const QString& store() const;


private:
    LoginRequest m_loginRequest;
    bool m_loginRequestPresent;
    LoginResponse m_loginResponse;
    bool m_loginResponsePresent;
    Logout m_logout;
    bool m_logoutPresent;
    ObjectDatas m_objectDatas;
    bool m_objectDatasPresent;
    Ping m_ping;
    bool m_pingPresent;
    Pong m_pong;
    bool m_pongPresent;
    ServerStatus m_serverStatus;
    bool m_serverStatusPresent;
    ServiceRequest m_serviceRequest;
    bool m_serviceRequestPresent;
    ServiceRequestResponse m_serviceRequestResponse;
    bool m_serviceRequestResponsePresent;
    QString m_lastError; 
    bool m_changed; 
    QString m_store;
}; 
} //end ns

#endif
